import { Navigate } from 'react-router-dom';
import MyLayout from '../pages/Layout/MyLayout';
import Login from '../pages/Login/Login';
import Hthome from '../pages/Layout/hthome/Hthome';
import CateGory from '../pages/Layout/cateGory/Category';
import Bannermange from '../pages/Layout/bannermange/Bannermange';
import RoleMange from '../pages/Layout/classmange/roleMange/RoleMange';
import MenusMange from '../pages/Layout/classmange/menusMange/MenusMange';
import UserMange from '../pages/Layout/classmange/userMange/UserMange';
import Studymange from '../pages/Layout/studymange/Studymange';
// Testmange is not used
import Cate from '../pages/Layout/testmange/cate/cate';
import List from '../pages/Layout/testmange/list/list';
import CourseList from '../pages/Layout/course/CourseList';
import CourseAdd from '../pages/Layout/course/CourseAdd';
import Livelist from '../pages/Layout/adminmange/livelist/livelist';
import Liveadd from '../pages/Layout/adminmange/liveadd/liveadd';
import Livedetails from '../pages/Layout/adminmange/livedetails/livedetails';

export const router = [
	{
		path: '/',
		element: <Navigate to='layout'></Navigate>,
	},
	{
		path: '/login',
		element: <Login></Login>,
	},
	{
		path: '/layout',
		element: <MyLayout></MyLayout>,
		children: [
			{
				path: '',
				element: <Navigate to='/layout/hthome'></Navigate>,
			},
			{
				path: 'hthome',
				element: <Hthome></Hthome>,
			},
			{
				path: 'cateGory',
				element: <CateGory></CateGory>,
			},
			{
				path: 'bannermange',
				element: <Bannermange></Bannermange>,
			},
			{
				path: 'classmange',
				children: [
					{
						path: 'rolemange',
						element: <RoleMange></RoleMange>,
					},
					{
						path: 'menusmange',
						element: <MenusMange></MenusMange>,
					},
					{
						path: 'usermange',
						element: <UserMange></UserMange>,
					},
				],
			},
			{
				path: 'course',
				children: [
					{
						path: 'list',
						element: <CourseList></CourseList>,
					},
					{
						path: 'add',
						element: <CourseAdd></CourseAdd>,
					},
				],
			},
			{
				path: 'studymange',
				element: <Studymange></Studymange>,
			},
			{
				path: 'testmange',
				children: [
					{
						path: 'cate',
						element: <Cate></Cate>,
					},
					{
						path: 'list',
						element: <List></List>,
					},
				],
			},
			{
				path: 'adminmange',
				children: [
					{
						path: 'livelist',
						element: <Livelist></Livelist>,
					},
					{
						path: 'liveadd',
						element: <Liveadd></Liveadd>,
					},
					{
						path: 'livedetails',
						element: <Livedetails></Livedetails>,
					},
				],
			},
		],
	},
];
